<div class="topmenu" id="topmenu">
<ul>
<li class="sep"></li>
{section name=item loop=$CONTENT.tm_items}
<li><a href="{$CONTEXT.URL}{$CONTENT.tm_items[item].link}{$CONTEXT.URL_SUFFIX}">{$CONTENT.tm_items[item].name}</a>
{assign var=subs1 value=$CONTENT.tm_items[item].subs}
{if $subs1}
  <ul>
{section name=item1 loop=$subs1}
    <li><a href="{$CONTEXT.URL}{$subs1[item1].link}{$CONTEXT.URL_SUFFIX}">{$subs1[item1].name}</a>
{assign var=subs2 value=$subs1[item1].subs}
{if $subs2}
    <ul>
    {section name=item2 loop=$subs2}
    <li><a href="{$CONTEXT.URL}{$subs2[item2].link}{$CONTEXT.URL_SUFFIX}">{$subs2[item2].name}</a>
{assign var=subs3 value=$subs2[item2].subs}
{if $subs3}
      <ul>
{section name=item3 loop=$subs3}
        <li><a href="{$CONTEXT.URL}{$subs3[item3].link}{$CONTEXT.URL_SUFFIX}">{$subs3[item3].name}</a></li>
{/section}
      </ul>
{/if}
    </li>
    {/section}
    </ul>
{/if}
    </li>
{/section}
  </ul>
{/if}
</li>
<li class="sep"></li>
{/section}
</ul>
</div>
